home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / gtksourceview-2.0 / language-specs / eiffel.lang < prev    next >
Encoding:
Extensible Markup Language  |  2009-10-02  |  7.0 KB  |  239 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Hasan Karahan <hasan.karahan81@gmail.com>, updated by Remi Meier
  5.  Copyright (C) 2008 Hasan Karahan <hasan.karahan81@gmail.com>
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23. <language id="eiffel" _name="Eiffel" version="2.0" _section="Sources">
  24.  
  25.   <metadata>
  26.     <property name="mimetypes">text/x-eiffel</property>
  27.     <property name="globs">*.e;*.eif</property>
  28.     <property name="line-comment-start">--</property>
  29.   </metadata>
  30.  
  31.   <styles>
  32.     <style id="comment" _name="Comment" map-to="def:comment"/>
  33.     <style id="string" _name="String" map-to="def:string"/>
  34.     <style id="debug" _name="Debug" map-to="def:preprocessor"/>
  35.     <style id="assertion" _name="Assertion" map-to="def:preprocessor"/>
  36.     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  37.     <style id="type" _name="Data Type" map-to="def:type"/>
  38.     <style id="design-by-contract" _name="Design by Contract" map-to="def:keyword"/>
  39.     <style id="exception-handling" _name="Exception Handling" map-to="def:keyword"/>
  40.     <style id="predefined-variable" _name="Predefined Variable" map-to="def:builtin"/>
  41.     <style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
  42.     <style id="void" _name="Void Value" map-to="def:special-constant"/>
  43.     <style id="boolean" _name="Boolean Value" map-to="def:boolean"/>
  44.     <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
  45.     <style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
  46.   </styles>
  47.  
  48.   <default-regex-options case-sensitive="true"/>
  49.  
  50.   <definitions>
  51.  
  52.     <context id="single-quoted-string" style-ref="string">
  53.       <start>'</start>
  54.       <end>'</end>
  55.     </context>
  56.  
  57.     
  58.     <context id="multi-line-string" style-ref="string">
  59.       <start>"\[</start>
  60.       <end>\]"</end>
  61.       
  62.     </context>
  63.     
  64.     <context id="double-quoted-string" style-ref="string">
  65.       <start>"</start>
  66.       <end>"</end>
  67.        <include>
  68.          <context id="escaped-character" style-ref="escaped-character">
  69.            <match extended="true">
  70.            (\%\"|\%N|\%\%)
  71.            </match>
  72.          </context>
  73.        </include>
  74.     </context>
  75.     
  76.     
  77.  
  78.     <context id="line-comment" style-ref="comment" end-at-line-end="true">
  79.       <start>--</start>
  80.       <include>
  81.         <context ref="def:in-comment"/>
  82.       </include>
  83.     </context>
  84.  
  85.     <context id="debug" style-ref="debug">
  86.       <start>(^|\s)debug(\s|$)</start>
  87.       <end>(^|\s)end(\s|$)</end>
  88.     </context>
  89.  
  90.     <context id="assertion" style-ref="assertion">
  91.       <start>(^|\s)check(\s|$)</start>
  92.       <end>(^|\s)end(\s|$)</end>
  93.     </context>
  94.  
  95.     <context id="keywords" style-ref="keyword">
  96.  
  97.       <!-- class declaration -->
  98.       <keyword>indexing</keyword>
  99.       <keyword>deferred</keyword>
  100.       <keyword>expanded</keyword>
  101.       <keyword>class</keyword>
  102.       <keyword>obsolete</keyword>
  103.       <keyword>inherit</keyword>
  104.       <keyword>insert</keyword>
  105.  
  106.       <!-- parent list -->
  107.       <keyword>rename</keyword>
  108.       <keyword>as</keyword>
  109.       <keyword>export</keyword>
  110.       <keyword>all</keyword>
  111.       <keyword>undefine</keyword>
  112.       <keyword>redefine</keyword>
  113.       <keyword>select</keyword>
  114.       <keyword>end</keyword>
  115.       <keyword>(create|creation)</keyword>
  116.       <keyword>feature</keyword>
  117.  
  118.       <!-- feature declaration -->
  119.       <keyword>frozen</keyword>
  120.       <keyword>prefix</keyword>
  121.       <keyword>infix</keyword>
  122.       <keyword>is</keyword>
  123.  
  124.       <!-- routine -->
  125.       <keyword>obsolete</keyword>
  126.       <keyword>require\s*(else)?</keyword>
  127.       <keyword>local</keyword>
  128.  
  129.       <!-- routine body -->
  130.       <keyword>deferred</keyword>
  131.       <keyword>do</keyword>
  132.       <keyword>once</keyword>
  133.       <keyword>external</keyword>
  134.       <keyword>alias</keyword>
  135.       <keyword>ensure\s*(then)?</keyword>
  136.       <keyword>rescue</keyword>
  137.       <keyword>end</keyword>
  138.       <keyword>unique</keyword>
  139.       <keyword>invariant</keyword>
  140.       <keyword>end</keyword>
  141.  
  142.       <!-- binary -->
  143.       <keyword>and\s*(then)?</keyword>
  144.       <keyword>or\s*(else)?</keyword>
  145.       <keyword>xor</keyword>
  146.       <keyword>implies</keyword>
  147.  
  148.       <!-- unary -->
  149.       <keyword>not</keyword>
  150.  
  151.       <!-- instruction -->
  152.       <keyword>retry</keyword>
  153.       <keyword>if</keyword>
  154.       <keyword>then</keyword>
  155.       <keyword>elseif</keyword>
  156.       <keyword>else</keyword>
  157.       <keyword>end</keyword>
  158.       <keyword>inspect</keyword>
  159.       <keyword>when</keyword>
  160.       <keyword>end</keyword>
  161.  
  162.       <!-- loop -->
  163.       <keyword>from</keyword>
  164.       <keyword>invariant</keyword>
  165.       <keyword>variant</keyword>
  166.       <keyword>until</keyword>
  167.       <keyword>loop</keyword>
  168.       <keyword>do</keyword>
  169.       <keyword>end</keyword>
  170.  
  171.       <!-- expression -->
  172.       <keyword>strip</keyword>
  173.       <keyword>old</keyword>
  174.  
  175.       <!-- type -->
  176.       <keyword>separate</keyword>
  177.       <keyword>expanded</keyword>
  178.       <keyword>like</keyword>
  179.     </context>
  180.  
  181.     <context id="predefined-variables" style-ref="predefined-variable">
  182.       <keyword>Current</keyword>
  183.       <keyword>Precursor</keyword>
  184.       <keyword>Result</keyword>
  185.     </context>
  186.  
  187.     <context id="void-value" style-ref="void">
  188.       <keyword>Void</keyword>
  189.     </context>
  190.  
  191.     <context id="boolean" style-ref="boolean">
  192.       <keyword>False</keyword>
  193.       <keyword>True</keyword>
  194.     </context>
  195.  
  196.     <context id="class-types" style-ref="type">
  197.       <match extended="true">
  198.       [A-Z_][A-Z0-9_]+
  199.       </match>
  200.     </context>
  201.  
  202.  
  203.     <context id="number" style-ref="decimal">
  204.       <match extended="true">
  205.       (?<![\w\.])
  206.       (([0-9]+)|([0-9]+\.[0-9]+([Ee][-]?[0-9]+)?))
  207.       (?![\w\.])
  208.       </match>
  209.     </context>
  210.  
  211.     <context id="hexadecimal" style-ref="hexadecimal">
  212.       <match extended="true">
  213.       (?<![\w\.])
  214.       \$[0-9a-fA-F]*
  215.       (?![\w\.])
  216.       </match>
  217.     </context>
  218.  
  219.     <context id="eiffel">
  220.       <include>
  221.         <context ref="single-quoted-string"/>
  222.         <context ref="multi-line-string"/>
  223.         <context ref="double-quoted-string"/>
  224.         <context ref="line-comment"/>
  225.         <context ref="debug"/>
  226.         <context ref="assertion"/>
  227.         <context ref="keywords"/>
  228.         <context ref="predefined-variables"/>
  229.         <context ref="class-types"/>
  230.         <context ref="void-value"/>
  231.         <context ref="boolean"/>
  232.         <context ref="number"/>
  233.         <context ref="hexadecimal"/>
  234.       </include>
  235.     </context>
  236.  
  237.   </definitions>
  238. </language>
  239.